package team.fivez.defaultmanage.dao;


import team.fivez.defaultmanage.domain.IndustryInfo;
import team.fivez.defaultmanage.domain.RedoApplication;
import team.fivez.defaultmanage.domain.RegionInfo;

import java.sql.Timestamp;
import java.util.List;

public interface RedoApplicationDao {


    //插入申请表
    int insertRedoApplication(RedoApplication redoApplication);


    //根据客户名查找重生申请单信息
    RedoApplication getRedoApplicationByCustomerName(String customerName);

    //根据审核状态查看申请单信息列表
    List<RedoApplication> getListByApprovementStatusAndApplicantAccount(int approvementStatus, String applicantAccount);

    //根据客户名称和申请人查看重生申请单列表
    List<RedoApplication> getListByCustomerNameAndApplicantAccount(String customerName, String applicantAccount);

    //全部的重生违约单
    List<RedoApplication> getAllList();

    //根据审核状态查找重生单信息列表
    List<RedoApplication> getListByApprovementStatus(int approvementStatus);

    //根据申请人账号获取所有的申请表
    List<RedoApplication> getListByApplicantAccount(String applicantAccount);

    //根据客户名称查找重生单信息列表
    List<RedoApplication> getListByCustomerName(String customerName);

    //更改审核状态
    void updateApprovementStatusByApplicationNumber(int approvementStatus,String applicationNumber);

    //根据申请单号进行查找
    RedoApplication getRedoApplicationByNumber(String number);

    //更新审核时间
    void updateApplicationTimeByApplicationNumber(String applicationNumber, Timestamp approvementTime);

    //更新审核人姓名
    void updateDefaultApproverNameByApplicationNumber(String applicationNumber,String redoApproverName);

    //按照姓名统计记录数量
    Integer countByName(String name);

    //从视图industry_redo视图当中获取
    List<IndustryInfo> getRedoIndustryInfo();

    //从视图region_redo视图当中获取
    List<RegionInfo> getRedoRegionInfo();


}
